
import { uuid } from "../util";
import Events from "../Events";

class ElementEntity extends Events {
    constructor(id, options, onClick, onRightClick) {
        super();
        this.options = options;
        this.id = id || uuid();
        this.Entity = new Cesium.Entity({
            id: this.id,
            show: true,
            _Source: this,
        });
        onClick && this.on('Click', onClick, this);
        onRightClick && this.on('Click', onClick, this);
    }
    set show(type) {
        this.Entity.show = !!type;
    }
    get show() {
        return this.Entity.show
    }
}


export { ElementEntity }